package com.pceggs.workwall.util;

import android.app.Activity;
import android.app.Application;

import com.pceggs.workwall.AdDetailActivity;
import com.pceggs.workwall.AdListActivity;
import com.pceggs.workwall.AdListDetailActivity;

/**
 * company: yitian
 * Created by hzl
 * date:   2019/8/12.
 * desc:
 */
public class PceggsWallUtils {

    public static String authoritiesLoc = "";

    /**
     * 初始化下载控件
     *
     * @param application
     */
    public static void init(Application application) {
        //FileDownloader.setup(application);
    }

    /**
     * 启动页
     *
     * @param activity
     * @param pid
     * @param key
     * @param userId
     */
    public static void loadAd(Activity activity, String pid, String key, String userId, String deviced, String xwdeviceid) {
        AdListActivity.launch(activity, pid, key, userId, deviced, xwdeviceid);
    }

    /**
     * 设置authorities
     *
     * @param authorities
     */
    public static void setAuthorities(String authorities) {
        authoritiesLoc = authorities;
    }


    public static void loadDetailAd(Activity activity, String infourl) {
        AdListDetailActivity.launch(activity, infourl);
    }


    /**
     * @author gaochangde
     * @date 2020/9/28 9:56 AM
     */
    public static void loadDetail(Activity activity, String pid, String appKey, String userId, String deviced, String xwdeviceid, long adid) {
        AdDetailActivity.launch(activity, pid, appKey, userId, deviced, xwdeviceid, adid);
    }
}


